//
//  YJResultAddTableViewCell.m
//  练习04
//
//  Created by hcios on 2017/7/6.
//  Copyright © 2017年 hcios. All rights reserved.
//

#import "YJResultAddTableViewCell.h"

#define CELL_HEIGHT self.frame.size.height
#define CELL_WIDTH self.frame.size.width

@implementation YJResultAddTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    
}


#pragma mark - 初始化方法
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    return self;
}

#pragma mark - 初始化视图
-(void)layoutWithCellArray:(NSString *)titleString{
    
    //upLine
    _upLine = [[UIView alloc] initWithFrame:CGRectMake(15, 0, 1, (CELL_HEIGHT - 15) / 2)];
    _upLine.backgroundColor = [UIColor blackColor];
    [self addSubview:_upLine];
    
    //downLine
    _downLine = [[UIView alloc] initWithFrame:CGRectMake(15, CGRectGetMaxY(_upLine.frame) + 15, 1, (CELL_HEIGHT - 15) / 2)];
    _downLine.backgroundColor = [UIColor blackColor];
    [self addSubview:_downLine];
    
    //outCirle
    _outCircle = [[UIView alloc] initWithFrame:CGRectMake(12.5, 20, 5, 5)];
    _outCircle.backgroundColor = [UIColor blackColor];
    _outCircle.layer.cornerRadius = 5;
    _outCircle.layer.masksToBounds = YES;
    [self addSubview:_outCircle];
    
    //insideCirle
    _insideCirle = [[UIView alloc] initWithFrame:CGRectMake(12.5, 20, 5, 5)];
    _insideCirle.backgroundColor = [UIColor blackColor];
    _insideCirle.layer.cornerRadius = 5;
    _insideCirle.layer.masksToBounds = YES;
    [self addSubview:_insideCirle];
    
    //titleLabel
    _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_outCircle.frame) + 15, (CELL_HEIGHT - 20) / 2, CELL_WIDTH, 20)];
    _titleLabel.text = [NSString stringWithFormat:@"%@",titleString];
    [_titleLabel setFont:[UIFont systemFontOfSize:13]];
    [self addSubview:_titleLabel];
}


@end
